#define _CRT_SECURE_NO_WARNINGS 1

#include<stack>
#include<vector>
#include "stack.h"

void teststack()
{
	bit::stack<int> s1;
	s1.push(1);
	s1.push(2);
	s1.push(3);
	s1.push(4);
	s1.push(5);
	cout << s1.size() << endl;
	int length = s1.size();
	for (size_t i = 0; i < length; i++)
	{
		s1.top() = i;
		cout << s1.top() << " ";
	}
	cout << endl;
	for (size_t i = 0; i < length; i++)
	{
		cout << s1.top() << " ";
		s1.pop();
	}
	cout << endl << s1.empty();
}

void testqueue()
{
	bit::queue<int> s1;
	s1.push(1);
	s1.push(2);
	s1.push(3);
	s1.push(4);
	s1.push(5);
	s1.pop();

	cout << s1.size() << endl;
	int length = s1.size();
	/*for (size_t i = 0; i < length/2; i++)
	{
		s1.back() = i;
		cout << s1.back() << " ";
	}
	for (size_t i = length / 2; i < length; i++)
	{
		s1.front() = i;
		cout << s1.front() << " ";
	}*/
	//cout << endl;
	for (size_t i = 0; i < length; i++)
	{
		cout << s1.front() << " ";
		s1.pop();
	}
	cout << endl << s1.empty();
}

int main()
{
	teststack();
	testqueue();

	return 0;
}
